<template>
<div>
    用户名：<input type="text" v-model="user.username">
    密码：<input type="text" v-model="user.password">
    <button @click="login">提交</button>
</div>
</template>

<script>
import axios from 'axios'
export default {
data(){
return {
   user:{
        username:'',
        password:''
   }

}

},
methods: {
    login(){
        axios.post('http://157.122.54.189:9083/post',this.user).then(res=>console.log(res)).catch(err=>console.log(err))
    }
}
}
</script>
<style lang='less' scoped>

</style>
